#ifndef __IntroState_h__
#define __IntroState_h__

#include <list>
#include <fstream>
#include <Ogre.h>
#include <OIS/OIS.h>

#include <GameState.h>
#include <PlayState.h>
#include <ExtrasState.h>

class IntroState: public Ogre::Singleton<IntroState>, public GameState
{
  public:
    IntroState() {}

    void enter();
    void exit();
    void pause();
    void resume();

    void keyPressed(const OIS::KeyEvent&);
    void keyReleased(const OIS::KeyEvent&);

    void mouseMoved(const OIS::MouseEvent&);
    void mousePressed(const OIS::MouseEvent&, OIS::MouseButtonID);
    void mouseReleased(const OIS::MouseEvent&, OIS::MouseButtonID);

    bool frameStarted(const Ogre::FrameEvent&);
    bool frameEnded(const Ogre::FrameEvent&);

    void viewOverlays();
    bool mouseInPlay(const int, const int);
    bool mouseInRecords(const int, const int);
    bool mouseInCredits(const int, const int);
    bool mouseInQuit(const int, const int);
    std::list<unsigned int>* getRecords();

    // Heredados de Ogre::Singleton.
    static IntroState& getSingleton();
    static IntroState* getSingletonPtr();

  protected:
    Ogre::Root* _root;
    Ogre::SceneManager* _sceneMgr;
    Ogre::Viewport* _viewport;
    Ogre::Camera* _camera;
    Ogre::RenderWindow* _win;
    Ogre::OverlayManager* _overlayMgr;
    Ogre::OverlayElement* _mouseOverlay;

    bool _exitGame;
    std::list<unsigned int>* _records;

    // Variables para ver qué parte del menú está seleccionada
    bool _playSelected;
    bool _recordsSelected;
    bool _creditsSelected;
    bool _quitSelected;
    bool _somethingSelected;
};

#endif
